/**
 * @description: 扁平化
 * @param {*} arr The array
 * @return {*} array
 */
const flattenMap = arr =>
  [].concat(...arr.map(v => (Array.isArray(v) ? flattenMap(v) : v)));

module.exports = flattenMap;
